The present invention relates to the field of computer graphics, and in particular to methods and apparatus for realistically animating water and other fluids. The present invention relates to the field of computer graphics. Many computer graphic images are created by mathematically modeling the interaction of light with a three dimensional scene from a given viewpoint. This process, called rendering, generates a two-dimensional image of the scene from the given viewpoint, and is analogous to taking a photograph of a real-world scene. Animated sequences can be created by rendering a sequence of images of a scene as the scene is gradually changed over time. A great deal of effort has been devoted to making realistic looking rendered images and animations.
Realistically animating water and other fluids presents a particular challenge. The behavior of a fluid, for example a churning ocean, has a number of different characteristics that are difficult to animate by hand. To assist animators, simulations of fluid dynamics are often used to animate the fluid according to parameters defined by animators. In a typical fluid dynamics simulation, the fluid is modeled as a set of particles. The simulation solves a system of equations defining the dynamic behavior of the fluid to determine the motion of the set of particles. The result of the simulation is a set of particles imitating the behaviors of the fluid, such as waves, splashes, eddies, currents and ripples.
Although the set of particles animated by a typical simulation technique move, as a whole, like a fluid, it often does not look like a fluid if rendered directly. Typically, the number of particles in a set is too small to give the appearance of a continuous surface of a fluid. Some rendering techniques render particles as metaballs, which are “blobs” that stretch or deform themselves into a continuous “goo.” However, metaballs give the surface of the fluid a lumpy appearance, similar to rice pudding, which is unacceptable for representing fluids such as water. Another rendering technique creates an isosurface from the set of particles. The isosurface creates a smooth, spatially-continuous fluid surface; however, this surface is temporally discontinuous due to frame-to-frame noise. As a results, the motion of the isosurface appears jerky and discontinuous.
One rendering technique to create a smooth-looking fluid from the set of particles creates a level set representing the fluid surface from the set of particles. The level set is created from a signed distance function of the set of particles. The values of the level set are adjusted for each frame of animation from the velocities of the set of particles. This results in a fluid surface that is spatially continuous, i.e. smooth-looking, and temporally continuous, i.e. smoothly-animated.
Although level-sets provide a smooth-looking fluid, the relatively small number of particles used for the simulation does not allow for the fluid to form “sprays” as waves break or recede. The resulting fluid appears sterile and artificial. Increasing the number of particles in the fluid simulation may allow for a more realistic spray; however, this greatly increases the computational burden of the simulation. Additionally, the use of additional simulation particles is wasteful, as the majority of particles, such as those below the fluid surface, do not form sprays.
It is therefore desirable to have a system and method for creating realistic-looking sprays for simulated fluids. It is further desirable that the sprays do not increase the computational burden of the fluid simulation or rendering.